<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'goods-form',
	'enableAjaxValidation'=>false,
	'htmlOptions'=>array('enctype'=>'multipart/form-data'),
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<p><?php echo $form->labelEx($model,'goods_name'); ?></p>
		<p><?php echo $form->textField($model,'goods_name',array('size'=>60,'maxlength'=>60)); ?></p>
		<p><?php echo $form->error($model,'goods_name'); ?></p>
	</div>

	<div class="row">
		<p><?php echo $form->labelEx($model,'goods_price'); ?></p>
		<p><?php echo $form->textField($model,'goods_price',array('size'=>10,'maxlength'=>10)); ?></p>
		<p><?php echo $form->error($model,'goods_price'); ?></p>
	</div>

	<div class="row">
		<p><?php echo $form->labelEx($model,'goods_discount'); ?></p>
		<p><?php echo $form->textField($model,'goods_discount',array('size'=>3,'maxlength'=>3)); ?></p>
		<p><?php echo $form->error($model,'goods_discount'); ?></p>
	</div>

	<div class="row">
		<p><?php echo $form->labelEx($model,'goods_type_id'); ?></p>
		<p><?php echo $form->dropDownList($model,'goods_type_id',$model->getGoodsTypeOpinions()); ?></p>
		<p><?php echo $form->error($model,'goods_type_id'); ?></p>
	</div>

	<div class="row" id = 'goods_pictrues'>
		<p><?php echo $form->labelEx($model,'image'); ?></p>
		<p><?php echo  $form->fileField($model,'image'); ?></p>
		<p><?php echo $form->error($model,'image'); ?></p>
	</div>

	<div class="row buttons">
		<p><?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save',array('class'=>'form-button')); ?></p>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->
